import request from '@/utils/request'

export function editRepositoryState(data) {
  return request({
    url: '/webshop/RepositoryInfo',
    method: 'put',
    data: data
  })
}


// 查询仓库列表
export function listRepositoryInfo(query) {
  return request({
    url: '/webshop/RepositoryInfo/list',
    method: 'get',
    params: query
  })
}

// 查询仓库详细
export function getRepositoryInfo(repositoryId) {
  return request({
    url: '/webshop/RepositoryInfo/' + repositoryId,
    method: 'get'
  })
}

// 新增仓库
export function addRepositoryInfo(data) {
  return request({
    url: '/webshop/RepositoryInfo',
    method: 'post',
    data: data
  })
}

// 修改仓库
export function updateRepositoryInfo(data) {
  return request({
    url: '/webshop/RepositoryInfo',
    method: 'put',
    data: data
  })
}

// 删除仓库
export function delRepositoryInfo(repositoryId) {
  return request({
    url: '/webshop/RepositoryInfo/' + repositoryId,
    method: 'delete'
  })
}
